package com.zttek.photosShareProject.common.json;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.zttek.photosShareProject.modules.model.Info;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Y
 * Date: 2017-09-01
 * Time: 10:07
 */
public class InfoVO implements VO {

    //0 for notice,1 for share, 2 for comment
    public static final String SHARE = "share";
    public static final String COMMENT = "comment";

    public static final String NOTICE = "notice";

    //0 for notice, 1 for praise, 2 for collect, 3 for star, 4 for reply, 5 for at
    public static final String PRASIE = "praise";
    public static final String COLLECT = "collect";
    public static final String STAR = "star";
    public static final String REPLY = "reply";
    public static final String AT = "at";

    private Long infoId;
    private boolean sys;
    private String sysContent;
    private UserVO informer;
    private String attachType;
    private Object attachVO;
    private String  interact;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    private boolean read;

    public Long getInfoId() {
        return infoId;
    }

    public void setInfoId(Long infoId) {
        this.infoId = infoId;
    }

    public boolean isSys() {
        return sys;
    }

    public void setSys(boolean sys) {
        this.sys = sys;
    }

    public String getSysContent() {
        return sysContent;
    }

    public void setSysContent(String sysContent) {
        this.sysContent = sysContent;
    }

    public UserVO getInformer() {
        return informer;
    }

    public void setInformer(UserVO informer) {
        this.informer = informer;
    }

    public String getAttachType() {
        return attachType;
    }

    public void setAttachType(String attachType) {
        this.attachType = attachType;
    }

    public Object getAttachVO() {
        return attachVO;
    }

    public void setAttachVO(Object attachVO) {
        this.attachVO = attachVO;
    }

    public String getInteract() {
        return interact;
    }

    public void setInteract(String interact) {
        this.interact = interact;
    }

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public boolean isRead() {
        return read;
    }

    public void setRead(boolean read) {
        this.read = read;
    }

    public static class GetListForm{
        private Integer pageNum;
        private Integer pageSize;
        private String orderByField;
        private Long userId;
        private Integer range;
        private boolean ascend;

        public Integer getPageNum() {
            return pageNum;
        }

        public void setPageNum(Integer pageNum) {
            this.pageNum = pageNum;
        }

        public Integer getPageSize() {
            return pageSize;
        }

        public void setPageSize(Integer pageSize) {
            this.pageSize = pageSize;
        }

        public String getOrderByField() {
            return orderByField;
        }

        public void setOrderByField(String orderByField) {
            this.orderByField = orderByField;
        }

        public Long getUserId() {
            return userId;
        }

        public void setUserId(Long userId) {
            this.userId = userId;
        }

        public Integer getRange() {
            return range;
        }

        public void setRange(Integer range) {
            this.range = range;
        }

        public boolean isAscend() {
            return ascend;
        }

        public void setAscend(boolean ascend) {
            this.ascend = ascend;
        }
    }
}
